<? if(@$headphoto['Headphoto']['id']): ?>
	<h1>Izmena slike u zaglavlju #<?= $headphoto['Headphoto']['id']?></h1>
<? else: ?>
	<h1>Nova slika u zaglavlju</h1>
<? endif; ?>

<?= $this->Form->create("Headphoto", array("url"=>"/admin_head_photos/save", 'enctype'=>'multipart/form-data')) ?>
	<?= $this->Form->hidden("type", array('value'=>'specific')) ?>
	<?= $this->Form->hidden("id", array("value"=>@$headphoto['Headphoto']['id'])) ?>

	<?= $this->Form->label("entity", "Kategorija:") ?>
	<?= $this->Form->select("entity", $headphoto_entities, array('empty'=>false, 'value'=>@$headphoto['Headphoto']['entity'])) ?>

	<?= $this->Form->label("entity_id", "Identifikator kategorije slike:") ?>
	<?= $this->Form->text("entity_id", array('value'=>@$headphoto['Headphoto']['entity_id'], 'class'=>'large')) ?>

	<?= $this->Form->label("image", "Slika:") ?>
	<?= $this->Html->image("headphotos/".@$headphoto['Headphoto']['image']."?h=130", array("title"=>"Dimenzije 800x130px")) ?><br>
	<?= $this->Form->hidden("image_original", array("value"=>@$headphoto['Headphoto']['image'])) ?>
	<?= $this->Form->file("image") ?>

	<br clear="all">
	<?= $this->Form->submit('Sačuvaj', array('div'=>false)) ?>
	<?= $this->Form->submit('Poništi', array('onclick'=>"location.href='/admin_head_photos'", 'type'=>'button', 'div'=>false)) ?>
<?= $this->Form->end() ?>
